import { defineUniPages } from '@uni-helper/vite-plugin-uni-pages';
import { name } from './package.json';

/**
 * 全局配置
 */
export default defineUniPages({
  globalStyle: {
    navigationStyle: 'default',
    navigationBarTitleText: name,
    navigationBarBackgroundColor: '#ffffff',
    navigationBarTextStyle: 'black',
    backgroundColor: '#FFFFFF',
  },
  easycom: {
    autoscan: true,
    custom: {
      '^wd-(.*)': 'wot-design-uni/components/wd-$1/wd-$1.vue',
    },
  },
  tabBar: {
    color: '#999999',
    selectedColor: '#FF8E9E',
    backgroundColor: '#ffffff',
    borderStyle: 'black',
    height: '50px',
    fontSize: '12px',
    iconWidth: '36px',
    spacing: '3px',
    list: [
      {
        iconPath: '/static/tabbar/shouyeh.png',
        selectedIconPath: '/static/tabbar/shouyep.png',
        pagePath: 'pages/index/index',
        text: '首页',
      },
      {
        iconPath: '/static/tabbar/yichuh.png',
        selectedIconPath: '/static/tabbar/yichup.png',
        pagePath: 'pages/wardrobe/index',
        text: '衣橱',
      },
      {
        iconPath: '/static/tabbar/yichuh.png',
        selectedIconPath: '/static/tabbar/yichup.png',
        pagePath: 'pages/match/index',
        text: '搭配',
      },
      {
        iconPath: '/static/tabbar/wodeh.png',
        selectedIconPath: '/static/tabbar/wodep.png',
        pagePath: 'pages/loginApp/loginApp',
        text: '我的',
      },
    ],
  },
  pages: [
    {
      path: 'pages/index/index',
      layout: 'tabbar',
      style: {
        navigationBarTitleText: '',
        navigationStyle: 'custom',
      },
      name: 'home',
    },
    {
      path: 'pages/loginApp/loginApp',
      layout: 'tabbar',
      style: {
        navigationBarTitleText: '',
      },
      name: 'loginApp',
    },
    {
      path: 'pages/match/index',
      layout: 'tabbar',
      style: {
        navigationBarTitleText: '',
      },
      name: 'match',
    },
    {
      path: 'pages/wardrobe/index',
      layout: 'tabbar',
      style: {
        navigationBarTitleText: '',
      },
      name: 'wardrobe',
    },
  ],
});
